:root {
  --primary-color: #0070e0;
  --font-family: 'Ubuntu', sans-serif;
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family);
}

body {
  font-family: var(--font-family);
  margin: 0;
  display: flex;
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}

button:hover {
  border-color: #646cff;
}

button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

.card {
  padding: 2em;
}

#app {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }

  a:hover {
    color: #747bff;
  }

  button {
    background-color: #f9f9f9;
  }
}

/* Element Plus 主题覆盖 */
.el-menu-item {
  font-family: var(--font-family) !important;
}

.el-menu-item.is-active {
  color: var(--primary-color) !important;
  background-color: #f0f7ff !important;
}

.el-menu-item:hover {
  color: var(--primary-color) !important;
  background-color: #f0f7ff !important;
}

.el-menu {
  --el-menu-active-color: var(--primary-color) !important;
  --el-menu-hover-bg-color: #f0f7ff !important;
  --el-menu-bg-color: #fff !important;
  --el-menu-text-color: #596B8C !important;
}

.el-button--primary {
  --el-button-bg-color: var(--primary-color) !important;
  --el-button-border-color: var(--primary-color) !important;
  --el-button-hover-bg-color: #005bb3 !important;
  --el-button-hover-border-color: #005bb3 !important;
}

.el-breadcrumb__inner {
  font-family: var(--font-family) !important;
}

.el-breadcrumb__inner.is-link:hover {
  color: var(--primary-color) !important;
}

.el-dropdown-menu__item:hover {
  color: var(--primary-color) !important;
}

.el-pagination.is-background .el-pager li:not(.is-disabled).is-active {
  background-color: var(--primary-color) !important;
}

.el-checkbox__input.is-checked .el-checkbox__inner {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

.el-radio__input.is-checked .el-radio__inner {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

.el-switch.is-checked .el-switch__core {
  border-color: var(--primary-color) !important;
  background-color: var(--primary-color) !important;
}

.el-link {
  --el-link-text-color: var(--primary-color) !important;
  --el-link-hover-text-color: #005bb3 !important;
}

.el-tabs__item.is-active {
  color: var(--primary-color) !important;
}

.el-tabs__active-bar {
  background-color: var(--primary-color) !important;
}

.el-tabs__item:hover {
  color: var(--primary-color) !important;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
  .el-card {
    margin-bottom: 10px !important;
    width: 100% !important;
  }

  .el-card__body {
    padding: 10px !important;
  }

  .el-card__body>* {
    width: 100% !important;
    margin-right: 0 !important;
  }

  /* 确保卡片内的元素垂直排列 */
  .el-card__body>.el-row {
    display: flex !important;
    flex-direction: column !important;
  }

  .el-card__body>.el-row>* {
    width: 100% !important;
    margin-bottom: 10px !important;
  }

  /* 调整表单布局 */
  .el-form-item {
    margin-bottom: 15px !important;
  }

  .el-form-item__content {
    margin-left: 0 !important;
  }

  /* 调整按钮组布局 */
  .el-button-group {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }

  .el-button-group .el-button {
    margin-right: 0 !important;
    margin-bottom: 5px !important;
    width: 100% !important;
  }
}